Optimal. Leaf size=13 \[ \frac{x}{a}-\frac{\sin (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0377543, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2682, 8} \[ \frac{x}{a}-\frac{\sin (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2682
Rule 8
Rubi steps
\begin{align*} \int \frac{\sin ^2(x)}{a+a \cos (x)} \, dx &=-\frac{\sin (x)}{a}+\frac{\int 1 \, dx}{a}\\ &=\frac{x}{a}-\frac{\sin (x)}{a}\\ \end{align*}
Mathematica [A] time = 0.0082069, size = 17, normalized size = 1.31 \[ \frac{2 \left (\frac{x}{2}-\frac{\sin (x)}{2}\right )}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.047, size = 31, normalized size = 2.4 \begin{align*} -2\,{\frac{\tan \left ( x/2 \right ) }{a \left ( \left ( \tan \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}+2\,{\frac{\arctan \left ( \tan \left ( x/2 \right ) \right ) }{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.6375, size = 57, normalized size = 4.38 \begin{align*} \frac{2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} - \frac{2 \, \sin \left (x\right )}{{\left (a + \frac{a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.57096, size = 22, normalized size = 1.69 \begin{align*} \frac{x - \sin \left (x\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.50154, size = 46, normalized size = 3.54 \begin{align*} \frac{x \tan ^{2}{\left (\frac{x}{2} \right )}}{a \tan ^{2}{\left (\frac{x}{2} \right )} + a} + \frac{x}{a \tan ^{2}{\left (\frac{x}{2} \right )} + a} - \frac{2 \tan{\left (\frac{x}{2} \right )}}{a \tan ^{2}{\left (\frac{x}{2} \right )} + a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10746, size = 34, normalized size = 2.62 \begin{align*} \frac{x}{a} - \frac{2 \, \tan \left (\frac{1}{2} \, x\right )}{{\left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right )} a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]